package com.jf.furn.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.math.BigDecimal;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-12-17
 * Time:10:28
 */
@Data
@TableName("furniture")
public class Furn {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotEmpty
    private String name;
    @NotEmpty
    private String maker;
    @NotNull
    @Range(min = 0, message = "请输入数字")
    private BigDecimal price;
    @NotNull
    @Range(min = 0, message = "请输入数字")
    private BigDecimal stock;
    @NotNull
    @Range(min = 0, message = "请输入数字")
    private BigDecimal sale;
    private String imgPath = "assets/images/product-image/default.png";
}
